<template>
  <div :class="['i-input-label', backStage ? 'back-stage' : '']">
    <label :class="['label-text', required ? 'required' : '']"
      >{{ text }}{{ colon ? " : " : "" }}</label
    >
  </div>
</template>

<script>
// @group iview
export default {
  name: "InputLabel",
  props: {
    // 标签文本
    text: {
      type: String,
    },
    // 后台样式
    backStage: {
      type: Boolean,
    },
    // 是否必填
    required: {
      type: Boolean,
    },
    // 冒号？
    colon: {
      type: Boolean,
      default: true,
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang="less" scoped>
@import "./config/input";
.i-input-label {
  display: inline-block;
  font-size: @label-size;
  color: @label-color;
  margin-right: @label-mr;
}
</style>
